import request from '@/utils/request'

// 获取仓库列表
export function getWarehouseList() {
  return request({
    url: '/md/warehouse/list',
    method: 'get'
  })
}

// 获取仓库下拉选项
export function getWarehouseOptions() {
  return getWarehouseList().then(response => {
    return response.data.map(item => ({
      value: item.warehouseCode,
      text: item.warehouseName
    }))
  })
}